package com.api.syh56.shengyunhui.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import com.gitee.sunchenbin.mybatis.actable.annotation.DefaultValue;
import com.gitee.sunchenbin.mybatis.actable.annotation.Unique;
import lombok.*;
import lombok.experimental.FieldDefaults;


import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * 用户表
 */
@Data
@FieldDefaults(level = AccessLevel.PRIVATE)
@TableName("user")
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class User implements Serializable {


    @Column(name = "id",isKey = true,isAutoIncrement = true,comment = "用户id")
    private Long id;


    @Column(name = "user_name",comment = "用户名")
    private String userName;

    @Column(name = "password",comment = "密码")
    private String password;

    @Column(name = "dyc_password",comment = "动态密码")
    private String dycPassword;


    /**
     * 公司名称
     */
    @Column(name = "company",comment = "公司名称")
    private String company;

    /**
     * 联系电话
     */
    @Column(name = "telephone",comment = "联系电话")
    private String telephone;

    @Column(name = "email",comment = "邮箱")
    private String email;


    /**
     * 极光推送registration_id
     */
    @Column(name = "registration_id",comment = "极光推送registration_id")
    private String registrationId;


    /**
     * 真实姓名
     */
    @Column(name = "true_name",comment = "真实姓名")
    private String trueName;

    /**
     * 身份证号码
     */
    @Column(name = "identity_number",comment = "身份证号码")
    private String identityNumber;
    /**
     * 身份证照片正面
     */
    @Column(name = "id_number_pic",comment = "身份证照片正面")
    private String idNumberPic;
    /**
     * 身份证照片反面
     */
    @Column(name = "id_number_pic2",comment = "身份证照片反面")
    private String idNumberPic2;
    /**
     * 营业执照图片
     */
    @Column(name = "business_licence",comment = "营业执照图片")
    String businessLicence;


    /**
     * 统一社会信用代码
     */
    @Column(name = "social_credit_code",comment = "统一社会信用代码")
    String socialCreditCode;

    @Column(name = "reg_address",comment = "详细地址")
    @DefaultValue(value = "")
    private String regAddress;

    /**
     * 角色，未选择0/货主1/司机2
     */
    @Column(name = "roles",comment = "角色，未选择0/货主1/司机2")
    private Short roles;

    @Column(name = "sex",comment = "性别（男0，女1）")
    private Short sex;

    /**
     * 今日发货量
     */
    @Column(name = "today_delivery",comment = "今日发货量")
    @DefaultValue(value = "0")
    private Integer todayDelivery;

    /**
     * 总发货量
     */
    @Column(name = "total_delivery",comment = "总发货量")
    @DefaultValue(value = "0")
    private Integer totalDelivery;

    /**
     * 账号状态标记（0代表停用,1正常）
     */
    @Column(name = "status",comment = "账号状态标记（0代表停用,1正常）")
    private short status;

    /**
     * 实名认证状态标记（0未认证,1审核中，2审核通过，3审核未通过）
     */
    @Column(name = "auth_status",comment = "实名认证状态标记（0未认证,1审核中，2审核通过，3审核未通过）")
    private short authStatus;

    /**
     * 语音设置
     */
    @Column(name = "voice_setting",comment = "语音设置")
    @DefaultValue(value = "true")
    private Boolean voiceSetting;

    /**
     * 消息设置
     */
    @Column(name = "message_setting",comment = "消息设置")
    @DefaultValue(value = "true")
    private Boolean messageSetting;


    @Column(name = "avatar_url",comment = "头像")
    @DefaultValue(value = "https://syhcomm.oss-cn-beijing.aliyuncs.com/appIcon/DefaultAvatar.png")
    private String avatarUrl;

    @Column(name = "country",comment = "国家")
    private String country;

    @Column(name = "nick_name",comment = "昵称")
    private String nickName;

    @Column(name = "province",comment = "省")
    private String province;

    @Column(name = "city",comment = "市")
    private String city;

    @Column(name = "zone",comment = "区")
    private String zone;

    @Column(name = "address",comment = "详细地址")
    @DefaultValue(value = "")
    private String address;

    @Column(name = "wx_open_id",comment = "绑定微信OpenID")
    private String wxOpenId;

    @Column(name = "approved",comment = "批准")
    private Boolean approved;

    @Column(name = "approve_time",comment = "批准时间")
    private Date approveTime;

    @Column(name = "approve_by",comment = "批准人")
    private String approveBy;

    //邀请人
    @Column(name = "invite_by",comment = "邀请人")
    @DefaultValue(value = "")
    private String inviteBy;
    //邀请时间
    @Column(name = "invite_time",comment = "邀请时间")
    private LocalDateTime inviteTime;

    //邀请积分
    @Column(name = "invite_integral",comment = "邀请积分")
    @DefaultValue(value = "0")
    private BigDecimal inviteIntegral;


    @Column(name = "balance_amt",comment = "余额")
    @DefaultValue(value = "0")
    private BigDecimal balanceAmt;

    /**
     * 申请中金额
     */
    @Column(name = "applying_amt",comment = "申请中金额")
    @DefaultValue(value = "0")
    private BigDecimal applyingAmt;

    /**
     * 可提现金额
     */
    @Column(name = "withdraw_able",comment = "可提现金额")
    @DefaultValue(value = "0")
    private BigDecimal withdrawAble;

    /**
     * 已提现金额
     */
    @Column(name = "withdraw_done",comment = "已提现金额")
    @DefaultValue(value = "0")
    private BigDecimal withdrawDone;



    @Column(name = "is_company",comment = "是否是公司")
    private Boolean isCompany;


    @Column(name = "earnest_money",comment = "保证金")
    private BigDecimal earnestMoney;

    @Column(name = "transport_license",comment = "道路运输许可证")
    private String transportLicense;

    @Column(name = "account_name",comment = "银行卡账号名称")
    private String accountName;

    @Column(name = "account_value",comment = "银行卡账号")
    private String accountValue;

    @Column(name = "bank_name",comment = "用户提现账户银行名称")
    private String bankName;

    @Column(name = "bank_account",comment = "用户提现账户银行账号")
    private String bankAccount;

    @Column(name = "user_msg_cfg",comment = "用户消息设置")
    private String userMsgCfg;

    @Column(name = "coupon_num",comment = "总优惠券数量")
    private Integer couponNum;

    @Column(name = "cer_time",comment = "认证时间")
    private LocalDateTime cerTime;

    @Column(name = "creation_time",comment = "")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime creationTime;

    @Column(name = "last_modification_time",comment = "")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime lastModificationTime;

    @TableLogic(value = "0", delval = "id")
    @Column(name = "is_deleted")
    @DefaultValue("0")
    private Long isDeleted;

    /**
     * 专线详细地址
     */
    @Column(name = "driver_Location")
    private String driverLocation;

}